package com.example.entity.po;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serial;
import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * 用户表
 *
 * @TableName t_user
 */
@TableName(value = "t_user")
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ToString
@Builder
public class User implements Serializable {
	@Serial
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;

	@Schema(description = "用户ID，主键，自增长")
	@TableId(type = IdType.AUTO)
	private Long userId;

	@TableField(value = "username")
	@Schema(description = "用户编号")
	private String username;

	@Schema(description = "头像")
	private String avatar;

	@Schema(description = "用户在微信小程序中的唯一标识")
	private String openid;

	@Schema(description = "昵称")
	private String nickname;

	@Schema(description = "用户联系电话")
	private String phone;

	@Schema(description = "盐")
	private String salt;

	@Schema(description = "修改时间")
	private LocalDateTime modifyTime;

	@Schema(description = "创建时间")
	private LocalDateTime createTime;

	@Schema(description = "删除标记")
	private Integer delFlag;
}